<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%

String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
    <s:head theme="ajax"/>
    <title>My JSP 'choiceTopics.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="../../css/topics.css">
		<script type="text/javascript">
		function validateAll()
		{
		  if(document.getElementById("name").value==null||document.getElementById("name").value=="")
		  {
		    alert("请您认真填写课题名称,此项为必填项");
		    return false;
		  }
		  if(document.getElementById("content").value==""||document.getElementById("content").value==null)
		  {
		  alert("请您认真填写课题内容，此项为必填项");
		  return false;
		  }
		   if(document.getElementById("require").value==""||document.getElementById("require").value==null)
		  {
		  alert("请您认真填写课题要求，此项为必填项");
		  return false;
		  }
		
		    if(document.getElementById('modify_listR_professionalNum').length<3)
		  {
		  alert("请您认真选择面向专业，此项为必选项");
		  return false;
		  }
		  
		
		}
		</script>
  </head>
  
  <body style="background-color:#F5F9F9;">
<div>
	<s:form action="zcg/modify.action" method="post" theme="simple" onsubmit="return validateAll();">
	<s:if test="topics!=null">
	<table>
		<s:hidden name="topics.topicsNum" value="%{topics.topicsNum}"></s:hidden>
		<tr>
			<td class="mtopics_1">
				课题名:
			</td>
			<td class="mtopics_2">
				<s:textfield name="topics.topicsName" value="%{topics.topicsName}"
					theme="simple" size="50" cssClass="topicsName" id="name">
				</s:textfield>

			</td>
		</tr>
		<tr>
			<td class="mtopics_1">
				课题内容:
			</td>
			<td class="mtopics_2">
				<s:textarea name="topics.topicsContent" value="%{topics.topicsContent}"
					theme="simple" cssClass="topicsContent" id="content">
				</s:textarea>
			</td>
		</tr>
		<tr>
			<td class="mtopics_1">
				课题要求:
			</td>
			<td class="mtopics_2">
				<s:textarea name="topics.topicsRequire" value="%{topics.topicsRequire}"
					theme="simple" cssClass="topicsContent" id="require">
				</s:textarea>
			</td>
		</tr>
		<tr>
			<td class="mtopics_1">
				课题类别:
			</td>
			<td class="mtopics_2">
				<s:select  id="type" list="topicsClass" theme="simple" listKey="topicsClassNum" listValue="topicsClassName" value="topics.TopicsClass.topicsClassNum" name="topics.topicsClass.topicsClassNum"></s:select>
			</td>
		</tr>

			<tr>
			<td class="mtopics_1">
				面向专业:
			</td>
			<td class="mtopics_2">
				<s:optiontransferselect 
				id="modifySubject"
				name="listL.professionalNum"
				list="listL"
				listKey="professionalNum"
				listValue="professionalName"
				multiple="true"
				addToLeftLabel="向左移除<-"
				addToRightLabel="向右添加->"
				allowUpDownOnLeft="false"
				rightUpLabel="向上移动"
				rightDownLabel="向下移动"
				allowAddAllToLeft="false"
				allowAddAllToRight="false"
				headerKey="XL"
				headerValue="请选择该课题面向的专业"
				emptyOption="true"
				doubleList="listR"
				doubleName="listR.professionalNum"
				doubleListKey="professionalNum"
				doubleListValue="professionalName"
				doubleHeaderKey="XXL"
				doubleHeaderValue="专业优先级从上到下依次降低"
				doubleEmptyOption="true"
				doubleMultiple="true"
				cssClass="profCss1"
				doubleCssClass="profCss2"
				/>
			</td>
			
		</tr>
		<tr>
			<td class="mtopics_1" colspan="2">
				<s:submit name="submit" id="submit" value="修改" align="center"
					theme="simple"></s:submit>
				<s:hidden name="topics.autidingState" value="%{topics.autidingState}"></s:hidden>
			</td>
		</tr>
	</table>
	</s:if>
	</s:form>
</div>
<div>
	<s:if test="autidingState!=null">
	<s:if test='autidingState=="3"'>
		<s:if test="ts!=null">
			意见:<s:property value="ts.info"/>
		</s:if>
		<s:else>
			无反馈信息
		</s:else>
	</s:if>
	</s:if>
</div>
</body>